﻿<%@ Page Language="C#" MasterPageFile="~/Master.Master" AutoEventWireup="true" CodeBehind="ChangeSubUserInfo.aspx.cs"
    Inherits="HoaDon.ChangeSubUserInfo" Title="Thông tin tài khoản con" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <script type="text/javascript">
        function ValidateConfirmPass2(sender, args) {       
            var pass = document.getElementById('<%=txtPassword.ClientID%>');
            var pass2 = document.getElementById('<%=txtPassword2.ClientID%>');
            if(pass.value == pass2.value)
            {
                args.IsValid = true;
            }
            else
            {
                args.IsValid = false;
            }
        }
        function ValidateConfirmPass(sender, args) {       

                       var pass = document.getElementById('<%=txtPassword.ClientID%>');
            var pass2 = document.getElementById('<%=txtPassword2.ClientID%>');
            if(pass.value == pass2.value)
            {
                args.IsValid = true;
            }
            else
            {
                args.IsValid = false;
            }
        }
    </script>

    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <div style="width: 20%; float: left; margin-top: 5px;">
                Mật khẩu mới</div>
            <div style="width: 80%; float: left; margin-top: 5px;">
                <asp:TextBox ID="txtPassword" runat="server" Width="150px" TextMode="Password" MaxLength="50"
                    Text=""></asp:TextBox>
                <asp:RegularExpressionValidator ID="revPassword" ValidationExpression="^[a-zA-Z0-9]{8,50}$"
                    runat="server" ControlToValidate="txtPassword" SetFocusOnError="True" ErrorMessage="*"
                    ToolTip="Mật khẩu phải có độ dài trong khoảng [8-50] và không có kí tự đặc biệt"></asp:RegularExpressionValidator></div>
            <br />
            <div style="width: 20%; float: left; margin-top: 5px;">
                Nhập lại</div>
            <div style="width: 80%; float: left; margin-top: 5px;">
                <asp:TextBox ID="txtPassword2" runat="server" Width="150px" TextMode="Password" MaxLength="50"
                    Text=""></asp:TextBox>
                <asp:CustomValidator runat="server" ID="csSoftware" ClientValidationFunction="ValidateConfirmPass"
                    ErrorMessage="*" SetFocusOnError="True" ToolTip="Mật khẩu nhập lại không chính xác"></asp:CustomValidator>
            </div>
            <br />
            <div style="width: 20%; float: left; margin-top: 5px;">
                Họ tên *</div>
            <div style="width: 80%; float: left; margin-top: 5px;">
                <asp:TextBox ID="txtAgentName" runat="server" Width="200px" MaxLength="150"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rvAgentName" runat="server" ControlToValidate="txtAgentName"
                    ErrorMessage="*" ToolTip="Nhập họ tên" SetFocusOnError="True"></asp:RequiredFieldValidator></div>
            <br />
            <div style="width: 20%; float: left; margin-top: 5px;">
                Điện thoại</div>
            <div style="width: 80%; float: left; margin-top: 5px;">
                <asp:TextBox ID="txtPhone" runat="server" Width="150px" MaxLength="50"></asp:TextBox></div>
            <br />
            <div style="width: 20%; float: left; margin-top: 5px;">
                Công ty</div>
            <div style="width: 80%; float: left; margin-top: 5px;">
                <asp:TextBox ID="txtCompany" runat="server" Width="250px" MaxLength="250"></asp:TextBox></div>
            <br />
            <div style="width: 20%; float: left; margin-top: 5px;">
                Địa chỉ</div>
            <div style="width: 80%; float: left; margin-top: 5px;">
                <asp:TextBox ID="txtAddress" runat="server" Width="250px" MaxLength="250"></asp:TextBox></div>
            <br />
            <div style="width: 20%; float: left; margin-top: 5px;">
                Hóa đơn bán hàng</div>
            <div style="width: 80%; float: left; margin-top: 5px;">
                <asp:RadioButton ID="rb80" runat="server" Text="Mẫu in khổ nhỏ (bill58_80)" GroupName="hda" /><asp:RadioButton
                    ID="rbA5" runat="server" Text="Mẫu in khổ A5 dọc" GroupName="hda" /></div>
            <br />
            <div style="width: 20%; float: left; margin-top: 5px;">
                Kho, cửa hàng</div>
            <div style="width: 80%; float: left; margin-top: 5px; height: 100px; overflow-y: auto">
                <asp:CheckBoxList ID="cklKho" runat="server">
                </asp:CheckBoxList>
            </div>
            <br />
            <div style="width: 20%; float: left; margin-top: 5px;">
            </div>
            <div style="width: 80%; float: left; margin-top: 5px; margin-bottom: 20px;">
                <span id="SucsessChangePassword" runat="server" style="color: #008000; font-style: italic;">
                </span>
            </div>
            <div style="text-align: center; margin-top: 5px;">
                <asp:Button ID="btnOk" runat="server" Text="Lưu thay đổi" OnClick="btnOk_Click" />
            </div>
            <br />
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
